import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

@Component({
  selector: 'app-customer-property-resources-content',
  templateUrl: './customer-property-resources-content.component.html',
  styleUrls: ['./customer-property-resources-content.component.css']
})
export class CustomerPropertyResourcesContentComponent implements OnInit {

  menuIndex: number = 1;
  constructor(public route: ActivatedRoute,private router: Router) { }

  ngOnInit() {
    // this.route.params.subscribe
    // this.router.events.subscribe((data) =>{
    //   console.log(data);
    // });

    this.route.params.subscribe(params => {
      this.menuIndex = +params['menuIndex']; // (+) converts string 'id' to a number
      console.log('menuIndex : ' + this.menuIndex);
      // In a real app: dispatch action to load the details here.
    });

    
  }
}
